<?php
use yii\helpers\Html;
$state = yii::$app->params['paperinfostate'];
use yii\widgets\LinkPager;
?>
<table class="table table-hover">
    <thead>
    <tr>
        <th>学生id</th>
        <th>试卷名</th>
        <th>分数</th>
        <th>总分</th>
        <th>试卷状态</th>
        <th>单选题得分</th>
        <th>多选题得分</th>
        <th>判断题得分</th>
        <th>填空题得分</th>
        <th>大题得分</th>
        <th>交卷时间</th>
    </tr>
    </thead>
    <?php if(empty($info)): ?>
    <tbody>
        <tr>
            <th rowspan="10">没有试卷:(</th>
        </tr>
    </tbody>
    <?php else: ?>
    <?php foreach($info as $index => $item):?>
    <tbody>
        <tr>
            <td><?=$item['sid'];?></td>
            <td><?=$item['name'];?></td>
            <td><?=$item['allscore'];?></td>
            <td><?=$item['fullmarks'];?></td>
            <td><?=$state[$item['state']];?></td>
            <td><?=$item['radioscore'];?></td>
            <td><?=$item['checkboxscore'];?></td>
            <td><?=$item['judgescore'];?></td>
            <td><?=$item['completionscore'];?></td>
            <td><?=$item['bossscore'];?></td>
            <td><a href="<?=\app\service\UrlService::BuildUrl('/admin/personal/paperinfo',['studentpaperid'=>$item['sptableid']]);  ?>" >查看试卷详情</a></td>
        </tr>
    </tbody>
    <?php endforeach;?>
    <?php Endif; ?>
    <?= LinkPager::widget([
        'pagination' => $pagination,
    ]);?>
</table>
